#ifndef COMPRESS_DATA
#define COMPRESS_DATA 


class DecompressData
{

private:

    double **Y;
    double **Cb;
    double **Cr;

    int width;
    int height;

public:


     DecompressData(int w, int h):width(w),height(h){}

    ~DecompressData()
    {
        for(int i=0; i<height; ++i)
        {
            delete [] Y[i];
            delete [] Cb[i];
            delete [] Cr[i];
        }

        delete[] Y;
        delete[] Cb;
        delete[] Cr;
    }

    inline double **getY()
    {
        return Y;
    }

    inline double **getCb()
    {
        return Cb;
    }

    inline double **getCr()
    {
        return Cr;
    }

    inline void setY(double** t)
    {
        Y=t;
    }

    inline void setCb(double** t)
    {
        Cb=t;
    }

    inline void setCr(double** t)
    {
        Cr=t;
    }

};

class CompressData
{

private:

    char **Y;
    char **Cb;
    char **Cr;

    int width;
    int height;

public:


     CompressData(int w, int h):width(w),height(h)
     {
	
	Y=new char* [height];
	Cb=new char* [height];
	Cr=new char* [height];
	
	
	for(int i=0; i<height; ++i)
	{
	    Y[i]=new char [width];
	    Cr[i]=new char [width];
	    Cb[i]=new char [width];
	}
      
       
       
      }

    ~CompressData()
    {
        for(int i=0; i<height; ++i)
        {
            delete [] Y[i];
            delete [] Cb[i];
            delete [] Cr[i];
        }

        delete[] Y;
        delete[] Cb;
        delete[] Cr;
    }

    inline char **getY()
    {
        return Y;
    }

    inline char **getCb()
    {
        return Cb;
    }

    inline char **getCr()
    {
        return Cr;
    }
    
    
    
    double **dgetY()
    {
      
	double** dY=new double* [height];
	
	for(int i=0; i<height; ++i)
	{
	    dY[i]=new double [width];
	}
      
	for(int i=0; i<height; ++i)
	{
	      for(int j=0; j<width; ++j)
	      {
		dY[i][j]=(int)Y[i][j];
	      }
	}
      
      
        return dY;
    }

    double **dgetCb()
    {
	double** dCb=new double* [height];
	
	for(int i=0; i<height; ++i)
	{
	    dCb[i]=new double [width];
	}
      
	
	for(int i=0; i<height; ++i)
	{
	      for(int j=0; j<width; ++j)
	      {
		dCb[i][j]=(int)Cb[i][j];
	      }
	}
      
      
      
        return dCb;
    }

    double **dgetCr()
    {
      
      
	double** dCr=new double* [height];
	
	for(int i=0; i<height; ++i)
	{
	    dCr[i]=new double [width];
	}
      
      
      
	for(int i=0; i<height; ++i)
	{
	      for(int j=0; j<width; ++j)
	      {
		dCr[i][j]=(int)Cr[i][j];
	      }
	}
      
      
        return dCr;
    }
    
    

    void setY(double** t)
    {
	for(int i=0; i<height; ++i)
	{
	      for(int j=0; j<width; ++j)
	      {
		Y[i][j]=(int)t[i][j];
	      }
	}
	
    }

    inline void setCb(double** t)
    {
        for(int i=0; i<height; ++i)
	{
	      for(int j=0; j<width; ++j)
	      {
		Cb[i][j]=(int)t[i][j];
	      }
	}
    }

    inline void setCr(double** t)
    {
        for(int i=0; i<height; ++i)
	{
	      for(int j=0; j<width; ++j)
	      {
		Cr[i][j]=(int)t[i][j];
	      }
	}
    }

};



#endif
